package com.k8s.provider.springbootk8sprovider.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author：小鹿爱吃鱼
 * @Date: 2025/5/13 11:27
 * @Description:
 */
@RestController
@RefreshScope // 只能加在类上
public class HelloController {

    private static final Logger logger = LoggerFactory.getLogger(HelloController.class);


    @Value("${message:default value}")
    private String message;

    @Value("${secret:default value}")
    private String secret;

    @GetMapping("/hello")
    public String hello() {
        logger.info("hahahha");
        int i = 5/ 0;
        return message +"-"+secret+"-cicd";
    }

}
